package task;


import java.io.Serializable;

public class View implements Serializable {
    private static final long serialVersionUID = 10L;
    private String viewName;
    private String details;
    private Integer year;

    public View(String viewName, String details, Integer year) {
        this.viewName = viewName;
        this.details = details;
        this.year = year;
    }

    public String getViewName() {
        return viewName;
    }

    public void setViewName(String viewName) {
        this.viewName = viewName;
    }

    public String getDetails() {
        return details;
    }

    public void setDetails(String details) {
        this.details = details;
    }

    public Integer getYear() {
        return year;
    }

    public void setYear(Integer year) {
        this.year = year;
    }

    public View() {
    }

    public String showDetails() {
        return "景点名字：" + viewName +
                " , 详情信息：" + details  +
                " , 建成时间：" + year ;
    }

    @Override
    public String toString() {
        return viewName;
    }
}
